<template>
  <div class="navbar">
    <el-menu
    
      router
      :default-active="activeIndex2"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-menu-item index="/">首页</el-menu-item>
      <el-menu-item index="/api">API</el-menu-item>
      <el-menu-item index="/register" >注册</el-menu-item>
      <el-menu-item index="/login">登录</el-menu-item>
      <el-menu-item index="/registerData">修改注册信息</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="less" scoped>
@import "./index.less";
</style>